package phapp.model.barapp;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import javacommon.base.BaseEntity;


/**
 * <p> 标题: 商家主表, tc_shop_main_info 数据类 POJO
 * <p>Description: DAO层映射到数据类,页面封装数据映射到数据类
 * <p>Copyright: Copyright (c) 2014-10
 * <p>Company: 
 * @author you name
 * @version 1.0
*/

public class ShopMain extends BaseEntity {
   
   //date formats
   
   //columns START
   /**序列*/
   private java.lang.Integer id;
   /**名称*/
   private java.lang.String name;
   /**介绍说明*/
   private java.lang.String explains;
   
   private java.util.ArrayList idList;
   /**商品集合*/
   private java.util.List<ShopGood> shopGoodList;   
   
   //columns END

	public ShopMain(){
	}

	public java.util.List<ShopGood> getShopGoodList() {
		return shopGoodList;
	}

	public void setShopGoodList(java.util.List<ShopGood> shopGoodList) {
		this.shopGoodList = shopGoodList;
	}

	public ShopMain(
		java.lang.Integer id
	){
		this.id = id;
	}

   public void setId(java.lang.Integer value) {
      this.id = value;
   }
   
   public java.lang.Integer getId() {
      return this.id;
   }
   public void setName(java.lang.String value) {
      this.name = value;
   }
   
   public java.lang.String getName() {
      return this.name;
   }
   public void setExplains(java.lang.String value) {
      this.explains = value;
   }
   
   public java.lang.String getExplains() {
      return this.explains;
   }

   public java.util.ArrayList getIdList() {
      return idList;
   }

   public void setIdList(java.util.ArrayList idList) {
      this.idList = idList;
   }

    /**手动增加属性后,toString,hashCode,equals都要修改*/
   public String toString() {
      return new ToStringBuilder(this)
         .append("Id",getId())
         .append("Name",getName())
         .append("Explains",getExplains())
         .toString();
   }
   
   public int hashCode() {
      return new HashCodeBuilder()
         .append(getId())
         .append(getName())
         .append(getExplains())
         .toHashCode();
   }
   
   public boolean equals(Object obj) {
      if(obj instanceof ShopMain == false) return false;
      if(this == obj) return true;
      ShopMain other = (ShopMain)obj;
      return new EqualsBuilder()
         .append(getId(),other.getId())
         .append(getName(),other.getName())
         .append(getExplains(),other.getExplains())
         .isEquals();
   }
}

